***************************************************************************
****** TABLE A4. Summary Statistics Diagnostic Pre-Intervention Survey ****
***************************************************************************

use "$data/preintervention_survey_data.dta" , clear

log using "$filepath/output_logs/table A4", replace
	
cd "/Users/sebastiantonke/Dropbox/NamWater Nonpayment/Survey Analysis"
estpost tabstat atnampost atnamWater atotherplace receivedistance howoftencheck deliveryproblems payatNampost payatNamwater payatBank payatOther waitingline payincash ///
amountbill lastmonthbill paylessthanhalf payhalf paymorethanhalf payfull payinperson increaseplans easytounderstand inaccuratewrongbillings fairtopay ///
wateriscostly reasonmaintenance reasonpopcontribute reasonpurification reasonotheryes reasonno  reasonpoverty reasongiftofgod reasonotherno ///
otherspoverty othersignorance othersincorrectbill othersbroken otherstrustnamwater othersgiftofgod othersnoconseq othersdontknow othersotherreason ///
othersshouldpay othershouldpaydepends othersshouldnotpay  cutoffawareness owenamwater howlongcutoff cutoffrelation ///
cutoffveryunfair cutoffunfair cutofffair cutoffveryfair cutoffneither cutoffsomefairothersnot ///
payalotless payless paysame paymore payalotmore paydontknow usealotless useless usesame usemore usealotmore usedontknow ///
jerrycan reducingplans mainpurposegarden mainpurposeanimals mainpurposecook mainpurposewash mainpurposebath ///
hasanimals hasplants  woman age peopleinhh skilledwork unskilledwork official shopservice unemployed otherwork hhearnings notoilet flushbyhandtoilet flushtoilet ///
noothersource borehole river  dams canals oshana rainwater waterwell other, by(all) statistics(mean sd count) columns(statistics) nototal 
esttab using descriptive.rtf , cells("mean(fmt(2))  sd(fmt(2)) count(fmt(2))") replace nonote nomtitle nonumber wide label


** Does income correlate with Dicator giving?**
winsor hhearnings, gen(hhearningsw) p(0.01)
reg fractionpaid hhearningsw, rob

log close
